<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link rel="stylesheet" href="style.css" type="text/css" />
</head>
<body>
  <br>
  <p class="style30">ระบบจัดการข้อมูลเบื้องต้น</p>
  <hr />
  <br>
  <form method="post" action="insertSubject.php">
  <input type="text" name="subject">
  <input type="submit" value="เพิ่ม">
  </form>
  <br>
  <table border="1" cellspacing="0" cellpadding="5">
  <tr bgcolor="#0099CC">
  <td width="150"><div align="center" class="style29">รายวิชาทั้งหมด</div></td>
  <td width="100"><div align="center" class="style29">ลบรายวิชา</div></td>
  </tr>
  <? require("../connectDB.php");
  $tmp = "select * from subject";
  $sql = mysql_query($tmp);
  while($result = mysql_fetch_array($sql))    { ?>
<TR>
<TD><? echo $result["subject"]; ?></TD>
<TD><a href="deleteSubject.php?type=<? echo $result["subject"]; ?>">ลบ</a></TD>
<TR>
<? }
mysql_free_result($sql);
mysql_close($con);
?>
 </body>
</html>
